<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:constants="http://www.tuanzi.com/constants/tags"
                xmlns:security="http://www.springframework.org/security/tags"
                template="/templates/template.xhtml">
    <ui:define name="title">编辑出口分组信息</ui:define>
    <ui:define name="content">
        <h:form id="modelInfoForm" enctype="multipart/form-data">
            <div class="topbar clearfix"
                 style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%);">
                <p:toolbar>
                    <f:facet name="right">
                        <p:commandButton value="编辑" icon="fa fa-edit"
                                         actionListener="#{loanApplicationExportGroupInfoBean.changeStatusToEdit}"
                                         process="@this"
                                         update="@form" rendered="#{loanApplicationExportGroupInfoBean.isView()}"/>
                        <p:commandButton value="保存" icon="fa fa-save"
                                         actionListener="#{loanApplicationExportGroupInfoBean.onSave()}"
                                         update="@form"
                                         rendered="#{loanApplicationExportGroupInfoBean.isAdd() || loanApplicationExportGroupInfoBean.isEdit()}"/>
                        <p:button value="返回" icon="fa fa-reply-all" href="#{currentUserBean.back}"/>
                    </f:facet>
                </p:toolbar>
            </div>
            <div class="ui-g ui-fluid" style="padding-top: 30px;">
                <div class="ui-g-12 ">
                    <div class="ui-g-12 card">
                        <h1>基础信息</h1>
                        <p:panelGrid columns="4" layout="grid"
                                     columnClasses="ui-grid-col-1,ui-grid-col-5,ui-grid-col-1,ui-grid-col-5"
                                     styleClass="ui-panelgrid-blank"
                                     style="border:0px none; background-color:transparent;">

                            <p:outputLabel value="作用页面"><strong style="color: red">*</strong></p:outputLabel>
                            <p:selectOneMenu id="pageId" value="#{loanApplicationExportGroupInfoBean.$.pageId}" disabled="#{loanApplicationExportGroupInfoBean.isView()}">
                                <f:selectItem itemLabel="- 请选择 -" itemValue=""
                                              noSelectionOption="true"/>
                                <f:selectItems
                                        value="#{loanApplicationExportGroupInfoBean.pageList}"
                                        var="dic"
                                        itemLabel="#{dic.name}" itemValue="#{dic.id}"/>
                            </p:selectOneMenu>

                            <p:outputLabel value="名称"><strong style="color: red">*</strong></p:outputLabel>
                            <p:inputText id="name" value="#{loanApplicationExportGroupInfoBean.$.name}"
                                         disabled="#{loanApplicationExportGroupInfoBean.isView()}"/>

                            <p:outputLabel value="分组ID"><strong style="color: red">*</strong></p:outputLabel>
                            <p:inputText id="groupId" value="#{loanApplicationExportGroupInfoBean.$.groupId}"
                                         disabled="true"/>

                            <p:outputLabel value="类型"><strong style="color: red">*</strong></p:outputLabel>
                            <p:selectOneButton id="type" value="#{loanApplicationExportGroupInfoBean.$.type}" disabled="#{loanApplicationExportGroupInfoBean.isView()}">
                                <f:selectItems
                                        value="#{loanApplicationExportGroupInfoBean.dictionaries[DictionaryCode.EXPORT_TYPE]}"
                                        var="dic"
                                        itemLabel="#{dic.name}" itemValue="#{dic.value1}"/>
                            </p:selectOneButton>

                        </p:panelGrid>
                    </div>
                </div>
            </div>
        </h:form>
    </ui:define>
</ui:composition>